3.176 \(\int \frac{(a+b x^2)^2}{x^4 (c+d x^2)} \, dx\)

Optimal. Leaf size=66 \[ -\frac{a^2}{3 c x^3}-\frac{a (2 b c-a d)}{c^2 x}+\frac{(b c-a d)^2 \tan ^{-1}\left (\frac{\sqrt{d} x}{\sqrt{c}}\right )}{c^{5/2} \sqrt{d}} \]

[Out]

-a^2/(3*c*x^3) - (a*(2*b*c - a*d))/(c^2*x) + ((b*c - a*d)^2*ArcTan[(Sqrt[d]*x)/Sqrt[c]])/(c^(5/2)*Sqrt[d])

________________________________________________________________________________________

Rubi [A]  time = 0.0547288, antiderivative size = 66, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 22, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.091, Rules used = {461, 205} \[ -\frac{a^2}{3 c x^3}-\frac{a (2 b c-a d)}{c^2 x}+\frac{(b c-a d)^2 \tan ^{-1}\left (\frac{\sqrt{d} x}{\sqrt{c}}\right )}{c^{5/2} \sqrt{d}} \]

Antiderivative was successfully verified.

[In]

Int[(a + b*x^2)^2/(x^4*(c + d*x^2)),x]

[Out]

-a^2/(3*c*x^3) - (a*(2*b*c - a*d))/(c^2*x) + ((b*c - a*d)^2*ArcTan[(Sqrt[d]*x)/Sqrt[c]])/(c^(5/2)*Sqrt[d])

Rule 461

Int[(((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_))/((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Int[ExpandIntegr
and[((e*x)^m*(a + b*x^n)^p)/(c + d*x^n), x], x] /; FreeQ[{a, b, c, d, e, m}, x] && NeQ[b*c - a*d, 0] && IGtQ[n
, 0] && IGtQ[p, 0] && (IntegerQ[m] || IGtQ[2*(m + 1), 0] ||  !RationalQ[m])

Rule 205

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]*ArcTan[x/Rt[a/b, 2]])/a, x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rubi steps

\begin{align*} \int \frac{\left (a+b x^2\right )^2}{x^4 \left (c+d x^2\right )} \, dx &=\int \left (\frac{a^2}{c x^4}-\frac{a (-2 b c+a d)}{c^2 x^2}+\frac{(b c-a d)^2}{c^2 \left (c+d x^2\right )}\right ) \, dx\\ &=-\frac{a^2}{3 c x^3}-\frac{a (2 b c-a d)}{c^2 x}+\frac{(b c-a d)^2 \int \frac{1}{c+d x^2} \, dx}{c^2}\\ &=-\frac{a^2}{3 c x^3}-\frac{a (2 b c-a d)}{c^2 x}+\frac{(b c-a d)^2 \tan ^{-1}\left (\frac{\sqrt{d} x}{\sqrt{c}}\right )}{c^{5/2} \sqrt{d}}\\ \end{align*}

Mathematica [A]  time = 0.0520988, size = 64, normalized size = 0.97 \[ -\frac{a^2}{3 c x^3}+\frac{a (a d-2 b c)}{c^2 x}+\frac{(b c-a d)^2 \tan ^{-1}\left (\frac{\sqrt{d} x}{\sqrt{c}}\right )}{c^{5/2} \sqrt{d}} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b*x^2)^2/(x^4*(c + d*x^2)),x]

[Out]

-a^2/(3*c*x^3) + (a*(-2*b*c + a*d))/(c^2*x) + ((b*c - a*d)^2*ArcTan[(Sqrt[d]*x)/Sqrt[c]])/(c^(5/2)*Sqrt[d])

________________________________________________________________________________________

Maple [A]  time = 0.006, size = 98, normalized size = 1.5 \begin{align*}{\frac{{a}^{2}{d}^{2}}{{c}^{2}}\arctan \left ({dx{\frac{1}{\sqrt{cd}}}} \right ){\frac{1}{\sqrt{cd}}}}-2\,{\frac{abd}{c\sqrt{cd}}\arctan \left ({\frac{dx}{\sqrt{cd}}} \right ) }+{{b}^{2}\arctan \left ({dx{\frac{1}{\sqrt{cd}}}} \right ){\frac{1}{\sqrt{cd}}}}-{\frac{{a}^{2}}{3\,c{x}^{3}}}+{\frac{{a}^{2}d}{{c}^{2}x}}-2\,{\frac{ab}{cx}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((b*x^2+a)^2/x^4/(d*x^2+c),x)

[Out]

1/c^2/(c*d)^(1/2)*arctan(x*d/(c*d)^(1/2))*a^2*d^2-2/c/(c*d)^(1/2)*arctan(x*d/(c*d)^(1/2))*a*b*d+1/(c*d)^(1/2)*
arctan(x*d/(c*d)^(1/2))*b^2-1/3*a^2/c/x^3+a^2/c^2/x*d-2*a/c/x*b

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x^2+a)^2/x^4/(d*x^2+c),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 1.31396, size = 408, normalized size = 6.18 \begin{align*} \left [-\frac{3 \,{\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \sqrt{-c d} x^{3} \log \left (\frac{d x^{2} - 2 \, \sqrt{-c d} x - c}{d x^{2} + c}\right ) + 2 \, a^{2} c^{2} d + 6 \,{\left (2 \, a b c^{2} d - a^{2} c d^{2}\right )} x^{2}}{6 \, c^{3} d x^{3}}, \frac{3 \,{\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \sqrt{c d} x^{3} \arctan \left (\frac{\sqrt{c d} x}{c}\right ) - a^{2} c^{2} d - 3 \,{\left (2 \, a b c^{2} d - a^{2} c d^{2}\right )} x^{2}}{3 \, c^{3} d x^{3}}\right ] \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x^2+a)^2/x^4/(d*x^2+c),x, algorithm="fricas")

[Out]

[-1/6*(3*(b^2*c^2 - 2*a*b*c*d + a^2*d^2)*sqrt(-c*d)*x^3*log((d*x^2 - 2*sqrt(-c*d)*x - c)/(d*x^2 + c)) + 2*a^2*
c^2*d + 6*(2*a*b*c^2*d - a^2*c*d^2)*x^2)/(c^3*d*x^3), 1/3*(3*(b^2*c^2 - 2*a*b*c*d + a^2*d^2)*sqrt(c*d)*x^3*arc
tan(sqrt(c*d)*x/c) - a^2*c^2*d - 3*(2*a*b*c^2*d - a^2*c*d^2)*x^2)/(c^3*d*x^3)]

________________________________________________________________________________________

Sympy [B]  time = 0.782587, size = 172, normalized size = 2.61 \begin{align*} - \frac{\sqrt{- \frac{1}{c^{5} d}} \left (a d - b c\right )^{2} \log{\left (- \frac{c^{3} \sqrt{- \frac{1}{c^{5} d}} \left (a d - b c\right )^{2}}{a^{2} d^{2} - 2 a b c d + b^{2} c^{2}} + x \right )}}{2} + \frac{\sqrt{- \frac{1}{c^{5} d}} \left (a d - b c\right )^{2} \log{\left (\frac{c^{3} \sqrt{- \frac{1}{c^{5} d}} \left (a d - b c\right )^{2}}{a^{2} d^{2} - 2 a b c d + b^{2} c^{2}} + x \right )}}{2} + \frac{- a^{2} c + x^{2} \left (3 a^{2} d - 6 a b c\right )}{3 c^{2} x^{3}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x**2+a)**2/x**4/(d*x**2+c),x)

[Out]

-sqrt(-1/(c**5*d))*(a*d - b*c)**2*log(-c**3*sqrt(-1/(c**5*d))*(a*d - b*c)**2/(a**2*d**2 - 2*a*b*c*d + b**2*c**
2) + x)/2 + sqrt(-1/(c**5*d))*(a*d - b*c)**2*log(c**3*sqrt(-1/(c**5*d))*(a*d - b*c)**2/(a**2*d**2 - 2*a*b*c*d
+ b**2*c**2) + x)/2 + (-a**2*c + x**2*(3*a**2*d - 6*a*b*c))/(3*c**2*x**3)

________________________________________________________________________________________

Giac [A]  time = 1.15619, size = 96, normalized size = 1.45 \begin{align*} \frac{{\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \arctan \left (\frac{d x}{\sqrt{c d}}\right )}{\sqrt{c d} c^{2}} - \frac{6 \, a b c x^{2} - 3 \, a^{2} d x^{2} + a^{2} c}{3 \, c^{2} x^{3}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x^2+a)^2/x^4/(d*x^2+c),x, algorithm="giac")

[Out]

(b^2*c^2 - 2*a*b*c*d + a^2*d^2)*arctan(d*x/sqrt(c*d))/(sqrt(c*d)*c^2) - 1/3*(6*a*b*c*x^2 - 3*a^2*d*x^2 + a^2*c
)/(c^2*x^3)